package callbackExample2;

public class JavaApplication1 implements Callback{
    
    AnyClass newClass;

    public static void main(String[] args) {
        
        System.out.println("test...");
        
        JavaApplication1 myApplication = new JavaApplication1();
        myApplication.doSomething();

    }
    
    private void doSomething(){
        newClass = new AnyClass(this);
        newClass.calledFromMain();
    }

    @Override
    public void callback() {
        System.out.println("callback was called back");
    }
}
